/* 登录页面专用样式 */

/* Bootstrap Icons CDN - 添加到 index.html 或在此处导入 */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css");

/* 登录页面容器样式增强 */
.login-container {
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  33% {
    transform: translateX(-20px) translateY(-10px);
  }
  66% {
    transform: translateX(20px) translateY(10px);
  }
}

/* 登录卡片增强动画 */
.login-card {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* 表单控件焦点效果增强 */
.login-form .form-control:focus {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 0.2rem rgba(102, 126, 234, 0.25),
    0 4px 12px rgba(102, 126, 234, 0.15);
}

/* 登录按钮悬停效果增强 */
.btn-login {
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

/* 密码切换按钮样式增强 */
.password-toggle-btn {
  z-index: 10;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.password-toggle-btn:hover {
  background-color: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* 链接悬停效果 */
.login-links a {
  position: relative;
  transition: all 0.3s ease;
}

.login-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.login-links a:hover::after {
  width: 100%;
}

.login-links a:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

/* 错误提示动画 */
.invalid-feedback {
  animation: shakeError 0.5s ease-in-out;
}

@keyframes shakeError {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* 加载状态样式 */
.spinner-border-sm {
  animation: spin 1s linear infinite;
}

/* 响应式优化 */
@media (max-width: 576px) {
  .login-container {
    padding: 1rem 0.75rem;
  }

  .login-card {
    padding: 2rem 1.25rem;
    margin-bottom: 1rem;
  }

  .login-title {
    font-size: 1.4rem;
  }

  .login-subtitle {
    font-size: 0.9rem;
  }
}

@media (max-width: 375px) {
  .login-card {
    padding: 1.5rem 1rem;
  }

  .login-title {
    font-size: 1.3rem;
  }

  .form-control {
    font-size: 0.95rem;
  }

  .btn-login {
    font-size: 1rem;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .login-card {
    background: rgba(33, 37, 41, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .login-title {
    color: #fff;
  }

  .login-subtitle {
    color: #adb5bd;
  }

  .form-label {
    color: #fff;
  }

  .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .form-control::placeholder {
    color: #adb5bd;
  }

  .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #667eea;
    color: #fff;
  }

  .password-toggle-btn {
    color: #adb5bd;
  }

  .password-toggle-btn:hover {
    background-color: rgba(102, 126, 234, 0.2);
    color: #667eea;
  }
}
